<?php

namespace Home\Model;

use Think\Model;

class CommentModel extends Model {

    protected $trueTableName = 'comment';
    protected $_validate = [
        ['name', 'require', '称呼不能为空'],
        ['content', 'require', '评论不能为空'],
        // ['username','','帐号名称已经存在！', 0,'unique',1],
        // ['username','/^[a-z A-Z 0-9]{6,16}$/','账号必须6~18位', 2,'regex'],
        // ['password','/^[a-z A-Z 0-9]{6,16}$/','密码必须6~18位', 2,'regex'],
        // ['password', 'require', '密码不能为空'],
        // ['repassword', 'password', '确认密码不正确',0,'confirm'],
        ['email', 'require', '邮箱不能为空'],
        ['email', '/^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/', '邮箱格式错误！', 2, 'regex'],
    ];
    
    
    
    
    
    
}
